package no.rmz.chez.chess.pieces;

import java.util.Collection;

import no.rmz.chez.chess.board.ChessBoard;
import no.rmz.chez.chess.board.Color;
import no.rmz.chez.chess.board.Coord;
import no.rmz.chez.game.Move;

/**
 * Implement a chess bishop.
 */
public final class Bishop extends ChessPiece {

    /**
     * Building a bishop of a given color.
     * @param c the color
     */
    public Bishop(final Color c) {
        super(c, "Bishop", "B");
    }

    /**
     * @param result The collection where all the moves added.
     * @param b The chessboard on which the moves are generated.
     * @param c Coordinate were the bishop is located.
     */
    @Override
    public void addMoves(
            final Collection<Move> result,
            final ChessBoard b,
            final Coord c) {
        addDiagonalRays(result, b, c);
    }
}
